package com.kizuki.design.wrapper;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.util.Objects;

@Data
@Slf4j
@AllArgsConstructor
@NoArgsConstructor
public class WechatWrapper implements Notifier {

    private Notifier notifier;

    @Override
    public void send(String message) {
        if (Objects.isNull(notifier)) {
            return;
        }
        log.info("using wechat sending message:{}", message);
        notifier.send(message);
    }

}
